<template>
  <view class="page">
    <u-navbar @leftClick="navLeftClick" :fixed="false" title="设置" placeholder bgColor="#fff"></u-navbar>
    <view class="content">
      <view class="item" @click="jumpTo('/pages/setting/aboutUs?type=1')">
        <view class="u-flex">
          <image style="width: 30rpx;height: auto;margin-right: 24rpx;" src="../../static/setting/icon1.png" mode="widthFix" />
          <text>用户使用协议</text>
        </view>
        <u-icon name="arrow-right" color="#000" size="20rpx"></u-icon>
      </view>
      <view class="item" @click="jumpTo('/pages/setting/aboutUs?type=2')">
        <view class="u-flex">
          <image style="width: 30rpx;height: auto;margin-right: 24rpx;" src="../../static/setting/icon2.png" mode="widthFix" />
          <text>隐私协议</text>
        </view>
        <u-icon name="arrow-right" color="#000" size="20rpx"></u-icon>
      </view>
      <view class="item" @click="jumpTo('/pages/setting/aboutUs?type=3')">
        <view class="u-flex">
          <image style="width: 30rpx;height: auto;margin-right: 24rpx;" src="../../static/setting/icon3.png" mode="widthFix" />
          <text>关于平台</text>
        </view>
        <u-icon name="arrow-right" color="#000" size="20rpx"></u-icon>
      </view>
    </view>
    <view class="btn" @click="logout">退出登录</view>
  </view>
</template>

<script>

export default {
  data() {
    return {
    };
  },
  onLoad() {},
  methods: {
    logout() {
      const that = this
      uni.clearStorageSync()
      uni.setStorageSync('noLogin', '果然年代')
      uni.showToast({
        icon: 'none',
        title: `退出成功`
      })
      setTimeout(() => {
        that.reLaunch('/pages/index/index')
      }, 1000)
    }
  },
};
</script>

<style lang="scss" scoped>
.page {
  width: 750rpx;
  min-height: 100vh;
  background-color: #F5F5F5;
  padding-bottom: 80rpx;
  position: relative;
  .content {
    width: 702rpx;
    margin: 0 auto;
    margin-top: 12rpx;
    background: #FFFFFF;
    .item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 28rpx 24rpx;
      font-size: 28rpx;
      color: #000000;
    }
  }
  .btn {
    width: 360rpx;
    height: 80rpx;
    line-height: 80rpx;
    border-radius: 200rpx;
    border: 2rpx solid #56CB03;
    font-size: 28rpx;
    color: #56CB03;
    text-align: center;
    position: fixed;
    left: 195rpx;
    bottom: 138rpx;
  }
}
</style>
